DEMOLIBS = $(LIBSDIR)/libdemo.a
TRAGET = demo
DEMODIR = ..
LIBSDIR = $(DEMODIR)/lib
INCLUDEDIR = $(DEMODIR)/include
CFLAGS = -I$(INCLUDEDIR) -L$(LIBSDIR) 

all: $(DEMOLIBS)
	$(CC) $(CFLAGS) fcli.c -o fcli -lpthread -ldemo


$(DEMOLIBS): $(OBJS)
	$(AR) $(AROPTS) $@ $^

$(OBJS):

%.o:%.c
	$(CC) -c $(CFLAGS) $< -o $@

clean:
	@rm -f $(OBJS) $(DEMOLIBS) $(TRAGET)
